# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.RealTimeBidding.V1.Model.UrlRestriction do
  @moduledoc """
  Deprecated. This will be removed in October 2023. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api Represents the URL restriction (for the URL captured by the pixel callback) for a user list.

  ## Attributes

  *   `endDate` (*type:* `GoogleApi.RealTimeBidding.V1.Model.Date.t`, *default:* `nil`) - End date (if specified) of the URL restriction. End date should be later than the start date for the date range to be valid.
  *   `restrictionType` (*type:* `String.t`, *default:* `nil`) - The restriction type for the specified URL.
  *   `startDate` (*type:* `GoogleApi.RealTimeBidding.V1.Model.Date.t`, *default:* `nil`) - Start date (if specified) of the URL restriction.
  *   `url` (*type:* `String.t`, *default:* `nil`) - Required. The URL to use for applying the restriction on the user list.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :endDate => GoogleApi.RealTimeBidding.V1.Model.Date.t() | nil,
          :restrictionType => String.t() | nil,
          :startDate => GoogleApi.RealTimeBidding.V1.Model.Date.t() | nil,
          :url => String.t() | nil
        }

  field(:endDate, as: GoogleApi.RealTimeBidding.V1.Model.Date)
  field(:restrictionType)
  field(:startDate, as: GoogleApi.RealTimeBidding.V1.Model.Date)
  field(:url)
end

defimpl Poison.Decoder, for: GoogleApi.RealTimeBidding.V1.Model.UrlRestriction do
  def decode(value, options) do
    GoogleApi.RealTimeBidding.V1.Model.UrlRestriction.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.RealTimeBidding.V1.Model.UrlRestriction do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
